#include <stdio.h>
#include <math.h>
#include <stdbool.h>
#define C 1000
#define LOFSIDE 10
int minAreas(int n)
{
    int minRet = 0x3f3f3f3f;
    for(int x = 1;x<=n;++x)
    {
        for(int y = 1;y<=n;++y)
        {
            int z = n/(x*y);
            if(z*x*y!=n) continue;
            int areas = 200*(x*y+x*z+y*z);
            minRet = minRet<areas?minRet:areas;
           
        }
    }
    return minRet;
}

bool isPrime(int x)
{
    for(int i = 2;i<x;++i)
    {
        if(x%i==0)
            return false;
    }
    return x>=2;
}

int main()
{
    int n = 0;
    printf("input:");
    scanf("%d",&n);
    int ret = 0;
    if(isPrime(n))
        ret = 200*(1*n+1*1+n*1);
    else
        ret = minAreas(n);
    printf("minAreas:%d\n",ret);
    return 0;
}
